package com.example.adapter.demo.power.classadapter;

/**
 * 适配器
 * 将国标220V交流电转换成5V直流电
 */
public class DC5Adapter extends AC220 implements DC5 {
    @Override
    public int outputDC5V() {
        int input = super.output220V();
        int output = input / 44;
        System.out.println(String.format("DC5Adapter 将:%dV电压转换成:%dV", input, output));
        return output;
    }

}
